home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 029a / tsbat27.zip / TSBAT.NWS < prev    next >
Text File  |  1991-09-09  |  22KB  |  387 lines

  1. University of Vaasa, Finland, MIPS 2030 workstation garbo.uwasa.fi
  2. has a large collection of PD and shareware PC programs available by
  3. anonymous ftp or mail server. The file /pc/ts/0news-ts contains news
  4. about the TS-programs in the /pc/ts directory (in reverse order).
  5. This text, which you now have, is an edited extract from the
  6. 0news-ts file, and the feedback fback028.arc file.
  7. ...................................................................
  8. Prof. Timo Salmi        
  9. Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.87.1
  10. School of Business Studies, University of Vaasa, SF-65101, Finland
  11. Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun
  12. ...................................................................
  13.  
  14. Mon 9-Sep-91: I have updated my collection of useful batch files. It
  15. is now /pc/ts/tsbat27.arc.
  16.    Four of the batches in the package has been updated. Of these
  17. DAILY.BAT for running a program no more than one a day (eg from
  18. autoexec.bat) utilized ENTER.TXT to simulate pressing the enter key.
  19. This is no longer necessary but has been rewritten (with a trick
  20. with the echo command) in a way that no longer needs this separate
  21. file. My thanks to Ran Cheremsh CHERMESH%BGUVM.BITNET for reporting
  22. the problem.
  23.    SCANZ for scanning .ZIP files for viruses had a bug in the
  24. routine for scanning embedded .ZIPs.
  25.  
  26. Tue 9-Jul-91: I have updated my collection of useful batch files. It
  27. is now /pc/ts/tsbat26.arc.
  28.    Note that even if you don't perhaps need the same batches as I
  29. do, these batches may teach you many useful batch programming
  30. tricks which I have accumulated during my PC years.
  31.    Made a number of minor stylistic corrections.
  32.    Since someone cracked the pkzip 1.10 authenticity (-av) code some
  33. BBSes have been putting in their own ads as the authenticity labels.
  34. A new batch rezip.bat removes these labels, which may give the users
  35. a false sense of security.
  36.    Added a simple batch ruler.bat which shows the screen columns
  37. using ansi codes to avoid excessive scrolling.
  38.    I have my ramdisk on currently on drive R on my PCs which I use
  39. at home and at office.  For whatever it is worth I have updated the
  40. batches to reflect this change. Some of the batches require anyway
  41. that you edit the paths in them to reflect yours, so no added
  42. problem arise because of this.  And, if you have your own ramdisk,
  43. say, on d:, you can put the statement subst r: d:\ eg in your
  44. autoexec.bat file to avoid the need of editing just because we may
  45. happen to have ramdisks on different drives. (To be accurate there
  46. is no absolute need of your d: physically being a ramdisk. But it
  47. makes things a bit faster.)
  48.  
  49. Sun 12-May-91: I have updated my collection of useful batch files to
  50. be /pc/ts/tsbat25.arc.
  51.    One of the constant worries of downloaders of archived packages
  52. is the threat of viruses. (Games from shady BBSes are particularly
  53. susceptibe, but even commercial products have been known to be
  54. infected). Fortunately there are good virus checkers like McAfee's
  55. /pc/virus/scanv77.zip and Fridrik Skulason's /pc/virus/fp-115a.zip
  56. available to check for infections. There are, however, two dilemmas
  57. in checking archived packages on a routine basis. (Since the format
  58. garbo.uwasa.fi archives mostly uses is .zip let's speak of zipped
  59. files). The first problem is that there are so many executable
  60. compressors in use currently (such as lzexe, pklite, diet, tinyprog,
  61. etc). This means that unless the virus checking programs can observe
  62. all these variations, a virus can be hiding in an execompressed
  63. form. Therefore it is advisable to expand the executables for the
  64. check. A second problem is that .zip files occasionally contain
  65. embedded .zip files (eg PC-Magazine's collections often do). These
  66. embedded .zip files must be unzipped for a closer examination.
  67.    The earlier versions of the tsbat collection included a batch
  68. called scanzip.bat. I have completely rewritten this batch to take
  69. care of the two eventualities discussed above. I have renamed the
  70. rewritten batch scanz.bat. Note that before using this new batch,
  71. you have to go through scanz.bat and edit all the directory path
  72. references to correspond to your own configuration. This is, of
  73. course, an inconvenience, but it is the best way of guaranteeing
  74. that a batch complicated as this stays reasonably efficient.
  75.  
  76. Wed 13-Mar-91: I have written a menu based ansi.sys driven advanced
  77. batch for sending command codes to the printer to make printer
  78. initialization and setting easy. It is called setprn.bat. It is for
  79. Diconix Inkjet Parallel Printer Model 150, which is an Espon
  80. compatible printer. Thus the batch is suitable for various different
  81. printer makes, and easily configurable. I have added this batch to
  82. my collection of (hopefully) useful and instructive batch files
  83. /pc/ts/tsbat24.arc best available by anonymous ftp from
  84. garbo.uwasa.fi archives. There is a program-based alternative to
  85. setprn.bat, that is setdico.exe which can be found in
  86. /pc/ts/tsprn##.arc. The difference is that in setprn.bat you are
  87. able to configure the printer codes if you wish.
  88.  
  89. Sat 29-Dec-90: I have programmed a fair number of MsDos batch files
  90. to make up a batch file collection of hopefully both useful and
  91. instructive batches. I have updated the collection to be version
  92. /pc/ts/tsbat23.arc by adding some new batches.
  93. ...
  94.    FU.BAT is a poor man's function evaluator utilizing gwbasic that
  95. (usually) belongs automatically to the MsDos delivery. The basic
  96. idea (pardon the pun) of combining batch and gwbasic programming is
  97. not really mine. I got it from the PC-Magazine. The code of this
  98. batch, however, is entirely due to yours truly.
  99. ...
  100.    ASK.EXE is a common batch file enhancer returning as errorlevel
  101. the ascii value of the first character of the user's response.
  102. An example of a simple batch utilizing ASK:
  103.     echo off
  104.     ASK Yes or no? /d /u
  105.     if errorlevel==89 if not errorlevel==90 echo It was a yes
  106.     if errorlevel==78 if not errorlevel==79 echo It was a no
  107.     echo on
  108. My ask has switches for lower case (/l) and upper case (/u)
  109. conversions, and (/d) "direct" reads without needing to press the
  110. enter key. The ask prompt may include escape sequences for ansi
  111. graphics. This is a feature not always available in other ask
  112. programs.
  113.    Ok, there are countless ask batch enhancers already around, so
  114. why yet another. Simply so that then tsbat23.arc has it, and you
  115. don't have to get one separately. Furthermore, this ask is both
  116. simple and general enough to be easy to use while being still
  117. flexible.
  118.    BTW, ask is the one command which the original MsDos batch
  119. programming most conspicuously lacks and needs. So many other
  120. seemingly lacking features are embedded in MsDos, and you just have
  121. to ferret them out. That's partly what tsbat23.arc collection is
  122. about.
  123. ...
  124.    SAFEDEL.BAT is a generalized batch for deleting files. It asks
  125. for confirmation for each file to be deleted. The usage is
  126.         SAFEDEL [FileName1] [FileNam2] ...
  127. and wildcards are allowed.
  128. ...
  129.    MENU.BAT show show to build menus for easy program selection by
  130. the user. This batch utilizes ask.exe, and is livened up by ansi
  131. graphics.
  132. ...
  133.    UNPACK.BAT has been updated. It extracts, tests, and views packed
  134. files (archives) irrespective of the packing method. The update
  135. handles also .arj files (the new arrival sent packing on the scene).
  136.  
  137. Mon 22-Oct-90: I have updated my batch file collection to be
  138. /pc/ts/tsbat22.arc. PC-Magazine Vol 9 Num 14 published a batch to
  139. com file compiler bat2exec.com by Douglas Boling which is in the
  140. /pc/pd2/bat2ex13.zip package at chyde.uwasa.fi archives. As would be
  141. expected a batch compiler is more stringent in its requirements than
  142. MsDos. Consequently I have gone through the batches in my collection
  143. and seen to it that they are compilable. Note that in doing this I
  144. have not altered the tasks of the batch files, nor have I included
  145. the resultant compiled .com files. Where needed, I have just
  146. adjusted the batches to conform with bat2exec.com compiler
  147. requirements.
  148.    Among others there is an addpath.bat batch for adding directories
  149. to the path without needing to rewrite the whole path as the
  150. ordinary path command would require. In a similar manner there is
  151. delpath.bat to omit a single directory from the path. Delpath.bat
  152. needs an auxiliary batch file called setvar.bat, which must be
  153. available to the delpath.bat. Delpath now checks whether the
  154. auxiliary setvar.bat file is available in the current directory or
  155. at path before running the rest of delpath.bat.
  156.    When a batch contains a call to a program, the program must
  157. either be in the current directory, at path, or the call must
  158. contain the path to the program. The last method has the
  159. disadvantage of requiring adaptation to user's own structure.
  160. Therefore the most general method is having the necessary program(s)
  161. at path. If the program is not available, a normal batch ends in a
  162. "Bad command or file name" error message. This gives very little
  163. information of the cause of the problem. Therefore I have added
  164. routines in the batches to precheck that the required program(s) are
  165. indeed at path, and if not, issue a proper error message telling
  166. what exactly is awry. (The batch trick here is testing whether a
  167. given file is at path.)
  168.    An additional note. Batches like delpath.bat cannot obviously be
  169. compiled successfully with bat2exec because of its need of an
  170. auxiliary batch. Another batch that works as a normal batch file,
  171. but won't work when compiled is color.bat. Color.bat sets the screen
  172. color attributes using ansi code. Bat2exec.exe compiler has similar
  173. problems with some other batches as well, but this does not affect
  174. the user of these batch files in any way.
  175.    I have added blk.bat as an alternative simple screen saver to
  176. complement blank.bat. Blk.bat stores the screen before blanking and
  177. pops it when you exit the saver.
  178.  
  179. Fri 13-Jul-90:  One of the operators at our computer centre asked me
  180. today whether I know a replacement utility for MsDos diskcopy to
  181. copy a 1.2Mb floppy to another without having to change the disks
  182. more than once. This is because MsDos diskcopy.com requires a total
  183. of five disk changes in the process, and besides this being tedious
  184. one easily gets things mixed up. If you look at things this way,
  185. scopy.bat in /pc/ts/tsbat21.arc does exactly what he was asking for,
  186. in a single step. But on the balance, you must have the target disk
  187. formatted before you begin the process (diskcopy does that for you,
  188. if necessary). This batch method works easily, though, only if the
  189. diskette to be copied has no subdirectories.
  190.  
  191. Sun 24-Jun-90: I have updated my batch file collection to be
  192. (/pc/ts)/tsbat21.arc. This time I have added my rendition of setting
  193. the screen text color and background. The color.bat batch uses ansi
  194. color codes. (Thus you must have loaded ansi.sys driver, or its
  195. enhanced equivalent (such as nansi.sys or zansi.sys). In other words
  196. your config.sys must have a line like device=\sys\zansi.sys in it).
  197.    Version tsbat20 introduced a scanzip.bat batch as a shell to scan
  198. .zip packages for viruses utilizing McAfee's scan.exe virus checker.
  199. In addition to unzipping the .zip files into a temporary directory
  200. the batch uncompressed lzexec .exe files, if any, using Alan
  201. Posner's (/pc/pd2) isl12.zip and Mitugu Kuriziono's
  202. (/pc/pd2/)unlzexe5.zip. With the introduction of version
  203. (/pc/virus/)scanv63.zip uncompression lzexed executables is no
  204. longer necessary, and I have adjusted the batch accordingly. I have,
  205. however, done this by just commenting away parts of the batch, so
  206. that you can still apply it if you have earlier than scan.exe
  207. version 63. I have also added checking overlay files in addition to
  208. .exe and .com files.
  209.    Please note that your email comments, feedback and suggestions on
  210. the ts-programs would be welcome. And if you want to look at other
  211. users' feedback, you can see it by getting /pc/pd2/post##.txt (## =
  212. 01, 02, and so on).
  213.  
  214. Thu 7-Jun-90: Lzexed files pose a problem for the present virus
  215. scanners. While waiting to see the announced scanv63 to appear with
  216. abilities to scan lzexe-compressed files, I wrote a batch to handle
  217. scanning .zip packages. This batch checks both ordinary and lzexed
  218. files within a .zip package. The following shareware and PD programs
  219. are needed: pkunzip.exe, scan.exe, islzexe.exe, unlzexe.exe, The
  220. packages containing these programs can be found from good BBSes and
  221. eg from chyde.uwasa.fi by anonymous ftp. The new batch scanzip.bat
  222. is included in the updated /pc/ts/tsbat20.arc batch file collection.
  223.  
  224. Fri 1-Jun-90: Released version /pc/ts/tsbat19.arc of my batch files
  225. collection. It includes two new batches. There is a poor man's
  226. screen save blank.bat, and there is an extension of the MsDos type
  227. command show.bat, which allows the usage of wildcards and multiple
  228. file names. You'll decide yourself if there is any usage for a
  229. wildcard type. Myself, I do not see any outright, but the batch
  230. itself is a very good exercise in batch programming. If you are new
  231. to this aspect of MsDos, I think you will learn many useful tricks
  232. from batches like this. - Where possible, I have tried to write the
  233. batches in a way that they need a minimum about of auxiliary files
  234. or such auxiliary programs, which are not part of MsDos (internal or
  235. external) commands. - I have rewritten lastboot.bat (recording the
  236. previous boot time of your PC) and logrun.bat (recording program
  237. usage) so that they no longer need the auxiliary files enter.txt and
  238. star.txt, which have been deleted from the new version. - There are
  239. some stylistic changes in scopy.bat.
  240.  
  241. Sat 17-Mar-90: Released a new version /pc/ts/tsbat18.arc of my batch
  242. files collection. - It seems that this batch collection has become
  243. perhaps the most popular of my packages judging from the recent
  244. download figures and the comments from users. (A note written later:
  245. The most downloaded package of mine is the Frequently Asked
  246. Questions /pc/ts/tsfaq##.arc, by a broad margin). - Corrected a
  247. small bug in c.bat that prevented going back to the root directory.
  248. - Built a simple batch lastboot.bat for displaying the date and time
  249. of the previous booting. - Also built a new batch virus.bat. This
  250. batch makes a directory both prior and after running the suspect
  251. program, and gives a warning if the directories differ, and prepares
  252. a list of the differences. The batch can be also used by a
  253. knowledgeable user for the more benevolent similar purpose of
  254. checking what files a certain programs changes.
  255.    *Flame off* One lesson to be learned from batch programming is
  256. that properly used MsDos can be quite flexible. I think it is here
  257. to stay for a long time yet Unix and OS/2 notwithstanding. And this
  258. does not mean castigating Unix nor OS/2. (Any discussion of this
  259. aspect to the proper newsgroups, if you please.) *Flame on* :-)
  260.  
  261. Sun 11-Mar-90: Released a new version /pc/ts/tsbat17.arc of my batch
  262. files collection. This update introduces a batch shell unpack.bat
  263. for extracting, testing, and viewing packed files irrespective of
  264. the packing method.
  265.  
  266. Sun 04-Mar-90: My batch file collection is now version (/pc/ts/)
  267. tsbat16.arc. - Addpath.bat appending new directories to the path now
  268. checks whether the directory exists, and whether the directory
  269. already is at path, thus preventing mistakes by the user. I use this
  270. batch myself a lot, and since I often make typing errors, I wanted
  271. the batch to do the validity checking for me. - Arc2zip.bat
  272. converting an .arc file to a .zip file, with comment, has added
  273. safeguards against errors and corrupted archives. - Deldir.bat for
  274. deleting the files from a directory and then removing the directory,
  275. has been rewritten. - There are also new batches in the collection.
  276. - There is a harddisk version of the packing methods converter
  277. called zoo2arch.bat. It is a .zoo to .zip converter eg for those who
  278. prefer tighter .zip files over the binary posting's current .zoo
  279. packing method. - If you have been annoyed by the fact that MsDos
  280. cannot take more than one command per command line, m.bat is the
  281. batch for you. It is a batch that facilitates giving multiple MsDos
  282. commands. Another new batch is d.bat. It gives the directory with
  283. sort and generalized name matching. - Also managed to resist the
  284. temptation to rename the documentation to the obvious bat.man.
  285.  
  286. Thu 25-Jan-90: I have updated my batch file collection to be version
  287. (/pc/ts/)tsbat15.arc.  There is just one addition, daily.bat. It is
  288. intended to run a program from the autoexec.bat file only once in a
  289. day.  There are programs in circulation, which achieve the same
  290. thing as daily.bat.  The trick in daily.bat is that it is a true
  291. batch file without the need of any external user-made programs.
  292. This not a very difficult to do, but tricky enough to be
  293. interesting and educational.
  294.  
  295. Tue 16-Jan-90: I have still been thinking about batch files and
  296. interesting tricks to do with them, and I therefore publish a new
  297. upgrade of my botch :-) collection in a rapid succession after the
  298. last update. The upgrade is (/pc/ts/)tsbat14.arc, and it will be
  299. available by anonymous ftp at least from chyde.uwasa.fi, Simtel20,
  300. and by BBS download or file request from Micro Maniacs Opus 2:515/1
  301. telephone 358-0-425966. Two new utilities are included. The first is
  302. delpath.bat, which removes a directory from the path variable. This
  303. was a really tricky one, and my solution (contrary to the other
  304. batches in the collection) requires MsDos version 3.30 because it
  305. uses the call command. I have since seen another solution in the
  306. PC-Magazine (Vol 8 No 21) but mine uses a somewhat different
  307. technique, and should be clearer because even I can understand how
  308. mine works :-). The second new batch is deldir.bat for deleting the
  309. files from a directory and then removing the directory. This is
  310. really trivial, but I needed it myself. I have tried to include
  311. reasonable number of safeguards within this batch.
  312.  
  313. Sun 14-Jan-90: I have updated my batch file collection to be version
  314. (/pc/ts/)tsbat13.arc.
  315.    There is a new batch arc2zip.bat for converting an .arc file to a
  316. corresponding .zip file. The batch automatically adds your zip-file
  317. comment to the converted .zip. Also, the date of the zip file is
  318. automatically set to the date of the latest file within the .zip,
  319. not the date of the conversion.
  320.    Another new batch is zipdate. It demonstrates how to datestamp
  321. .zip packages.
  322.    The new version also includes a second addpath utility. It is
  323. apath-om.bat and is by Otto Makela. It is included in my batch file
  324. collection with Otto's explicit permission. Thanks Otto. This batch
  325. nicely demonstrates testing a condition (is a directory already in
  326. the path) in MsDos batch programming. I had an interesting time
  327. testing Otto's batch and discussing the dilemmas in the earlier
  328. versions after Otto posted the original version in the news in
  329. alt.msdos.programmer. I think that we both gained in the process. I
  330. would pleased to consider similar useful contributions from other
  331. users, as well. If you are interested, contact me by email.
  332.    Where.bat has been rewritten. It finds a file by using a search
  333. string on the file name. Contrary to the ordinary wildcarded MsDos
  334. DIR-type convention, where.bat matches the search string anywhere
  335. within the body of the file name. The updated where.bat has been
  336. made case-insensitive (applies upper case conversion on batch
  337. parameters).
  338.    Some of the other batches in the package have had their help
  339. texts extended.
  340.  
  341. Sat 18-Nov-89: There are several nice memory resident push/pop
  342. directory utilities around. As you know pushdir stores the name of
  343. the directory where you are. You can then change the directory (and
  344. the drive) as much as you like, and popdir takes you right back to
  345. the original directory. But memory resident programs tend to pile
  346. up, and I started thinking whether push/pop can be achieved using
  347. non-resident batch methods. PUSHDIRE.BAT and POPDIRE.BAT together
  348. with SETPUSHD.EXE do this by juggling the environment variables. I
  349. pushed these files in my batch file collection and updated it to be
  350. tsbat12.arc. You can pop them from there.
  351.  
  352. Tue 31-Oct-89: Released update /pc/ts/tsbat11.arc of my batch files
  353. collection. The new release introduces LOGRUN.BAT. It can be used
  354. for calling programs and logging the call in a usage log with
  355. time/date information. The batch utilizes MsDos time and date
  356. commands for making the usage log of the program calls. The bug
  357. caused by the non-standard switch /i in the file finder WHERE.BAT
  358. has been amended. A new batch LOCATE.BAT for locating a file (or
  359. files) on a disk has been added. Contrary to WHERE.BAT it is not
  360. case sensitive. The "change the directory" batch has been renamed
  361. C.BAT (was SD.BAT). I have also added more comments within some of
  362. the batches.
  363.   If you get an "Out of environment space" message in these, or any
  364. other batches, try increasing your environment space by using shell
  365. configuration in config.sys:
  366.      Example: shell=c:\bin\command.com c:\bin /e:1024 /p
  367.  
  368. Sun 29-Oct-89: I decided to introduce a batch file collection
  369. /pc/ts/tsbat10.arc.  The batches are quite straightforward, and do
  370. not need any special auxiliary programs, just the ordinary MsDos
  371. commands.  Some of the batches are from my other utility packages,
  372. some are new.  I do not claim a high degree of originality.  This is
  373. because the methods and tasks of batch programming keep repeating
  374. over and over again.  But I hope that you will find some of my
  375. tricks useful.
  376.   And if you feel that you have useful batches yourself, which you
  377. would like to distribute to your fellow users, I would be interested
  378. in considering any good ideas for development.  Due credit would
  379. naturally be given.  I would, however, reserve the right to choose,
  380. and to develop your batches to suit the future versions of this
  381. Public Domain collection.
  382.  
  383. Thu 26-Oct-89: I have a private mailing list for emailing these
  384. update news. Especially, if you have my programs downloadable at
  385. your site or your BBS you are welcome to ask for inclusion on this
  386. list by emailing to me at ts@chyde.uwasa.fi.
  387.